﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Windows.Data;

namespace Infrastructure.WpfClient.Extensions
{
    public static class IEnumerableExtension
    {
        public static ObservableCollection<TSource> ToObservableCollection<TSource>(this IEnumerable<TSource> source)
        {
            ObservableCollection<TSource> result = new ObservableCollection<TSource>( source);            
            return result;
        }
        public static ICollectionView ToCollectionView<TSource>(this IEnumerable<TSource> source)
        {
            var view = CollectionViewSource.GetDefaultView(source);
            return view;
        }
      
    }
}
